/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.expert.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.expert.entity.CustomerSolutionAndCare;

/**
 * 客户采纳护理项目DAO接口
 * @author lvbo
 * @version 2013-06-20
 */
public interface CustomerSolutionAndCareDao extends CustomerSolutionAndCareDaoCustom, CrudRepository<CustomerSolutionAndCare, Long> {

	@Query("from CustomerSolutionAndCare where SCS_ID = ?1 AND CARE_ID = ?2")
	public CustomerSolutionAndCare findByPKId(Long customerSolutionFaceId, Long solutionCareId);
	
	@Query("from CustomerSolutionAndCare where SCS_ID = ?1")
	public List<CustomerSolutionAndCare> findBySolutionId(Long customerSolutionFaceId);
	
	@Query("from CustomerSolutionAndCare where CARE_ID = ?1")
	public List<CustomerSolutionAndCare> findByCareId(Long solutionCareId);	
}

/**
 * DAO自定义接口
 * @author lvbo
 */
interface CustomerSolutionAndCareDaoCustom extends BaseDao<CustomerSolutionAndCare> {

}

/**
 * DAO自定义接口实现
 * @author lvbo
 */
@Component
class CustomerSolutionAndCareDaoImpl extends BaseDaoImpl<CustomerSolutionAndCare> implements CustomerSolutionAndCareDaoCustom {

}
